- Location:
/etc/sudoers
- Controls who can use
sudo (run commands as admin).
- Example:
%sudo ALL=(ALL:ALL) ALL
→ Anyone in the sudo group can run any command as admin.
- Always edit with:
sudo visudo
- Check what you can run with
sudo:
sudo -l
- Become root:
sudo su
sudo -i
- See who’s in the sudo group:
grep 'sudo' /etc/group
/etc/passwd → Lists all users (username, home folder, shell).
/etc/shadow → Stores encrypted passwords (only root can read).
/etc/group → Lists groups and members.
/etc/passwd shows usernames and services.
/etc/shadow (if you can read it) has password hashes that attackers might crack.
- Knowing users = important step in hacking challenges.